<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	//设置请求编码格式
	request.setCharacterEncoding("UTF-8");
	//获取游客的姓名
	String userName = request.getParameter("userName");
	//游客姓名的List集合
	List<String> userList = null;
	//判断appliation作用域中是否有内容。
	if (application.getAttribute("userList") != null) {
		//有，则取出
		userList = (List<String>) application.getAttribute("userList");
	} else {
		// 没有，则新建
		userList = new ArrayList<String>();
	}
	// 域对象设置
	// session←userName
	session.setAttribute("userName", userName);
	// appliation←userList←userName
	userList.add(userName);
	application.setAttribute("userList", userList);
	response.sendRedirect("03index.jsp");
%>